<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    <input type="button" value="按钮1" @click="f()">
    <input type="button" value="按钮2" v-on:click="f()">
    <!--值改变事件-->
    <select @change="c()" v-model="city">
        <option>北京</option>
        <option>上海</option>
        <option>广州</option>
    </select>
    <!--失去焦点事件-->
    <input type="text" @blur="b()">
</div>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script>
   let v = new Vue({
        el:"div",
        data:{
            city:"北京"
        },
        methods:{
            f:function () {
                console.log("按钮点击了");
            },
            c:function () {
                console.log("只改变了"+ v.city);
            },
            b:function () {
                console.log("编辑完成");
            }
        }
    })
</script>
</body>
</html>